package com.xh.bussiness.exam.service;

import java.util.List;

import com.xh.bussiness.exam.bean.dto.PaperTestDetailDto;
import com.xh.bussiness.exam.bean.dto.PaperTestDto;
import com.xh.bussiness.exam.bean.request.ErrorQuestionPaperTestRequest;
import com.xh.bussiness.exam.bean.request.PaperQuestionTestDetailSaveRequest;
import com.xh.bussiness.exam.bean.request.PaperTestQueryRequest;
import com.xh.bussiness.exam.bean.request.PaperTestSaveRequest;
import com.xh.bussiness.exam.model.PaperQuestionTestDetail;
import com.xh.bussiness.exam.model.PaperTest;
import com.xh.bussiness.tiku.bean.request.QuestionQueryRequest;
import com.xh.core.bean.ServiceResultBean;
import com.xh.core.bean.XhPage;
import com.xh.core.service.IBaseService;

/*
 * @Author daiwei
 * @Description
 * @Date 2019/4/10 14:02
 **/
public interface IPaperTestService extends IBaseService<PaperTest> {

    public ServiceResultBean<PaperTestDto> addNewTest(PaperTestSaveRequest bean);

    public ServiceResultBean<PaperTestDto> addRandomNewTest(QuestionQueryRequest bean, Integer paperType);

    public String addQuestionTestDetail(PaperQuestionTestDetailSaveRequest bean) ;

    public PaperTestDto getPaperTestById(String id);

    public PaperTestDto getPaperTestByUserAndPaperId(String userId,String paperId);

    public XhPage<PaperTestDto> queryPagePaperTest(XhPage page,PaperTestQueryRequest bean);

	public PaperTestDetailDto getTestDetailById(PaperQuestionTestDetailSaveRequest bean);

	public String submitTest(List<PaperQuestionTestDetail> details);

	public PaperTestDto addErrorQuestionPaperTest(ErrorQuestionPaperTestRequest bean);
	/**
     * 根据试卷类型查询学生作答记录
     * @param studentId
     * @param startDate
     * @param endDate
     * @param paperType
     * @return
     */
    List<PaperQuestionTestDetail> queryStudentTestDetail(String studentId, String startDate, String endDate, Integer paperType);
}
